home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
PET
/
S-Super PET
/
(s)t2.d64
/
CRT.ASM
< prev
next >
Wrap
Assembly Source File
|
2009-01-18
|
1KB
|
44 lines
nam ** crt.asm ** ref ex18m.asm
xdef crt
xref openf_
xref closef_
xref initstd_ ;init.kbd,crt
xref fputnl_
xref fputchar_
crt pshs x,d
jsr initstd_;init.std i/o
ldd #mode ;load address of file mode
pshs d
ldd #outfile;load address of file name
jsr openf_
leas 2,s
std outptr
ldx #$8000
nxtline lda #$50 ;80char per line
letter deca
bmi newline
ldb ,x+
pshs x,a ;save x,a
pshs d
ldd outptr
jsr fputchar_ ;display it
leas 2,s
puls a,x ;restore a,x
bra letter
newline ldd outptr
pshs x
jsr fputnl_ ;empty buffer and newline
puls x
cmpx #$872e ;do 23 lines only
blo nxtline
ldd outptr ;finished
jsr closef_
puls d,x
rts
outfile fcc "printer"
fcb 0
mode fcc "w"
fcb 0
outptr rmb 2
end